package com.aijk.web.admin.entity;

/**
 * 人群分类枚举
 */
public enum ResidentTypeEnum {
    pregnantGroup("01","孕产妇"),childrenGroup("02","0-6岁儿童"),agedGroup("03","65岁以上老年人"),hypertensionGroup("04","高血压人群"),
    diabeticGroup("05","2型糖尿病患者"),psychoticGroup("06","重性精神疾病患者"),tuberculosisGroup("07","肺结核患者"),disabledGroup("08","残疾人"),
    familyPlanSpecialGroup("09","计生特殊家庭"),noKeyGroup("10","非重点人群"),recordCardGroup("11","农村建档立卡低收入人口"),allowancesGroup("12","城镇低保人群"),keyGroup("99","重点人群");

    private String type;
    private String discription;

    private ResidentTypeEnum(String type, String discription) {
        this.type = type;
        this.discription = discription;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDiscription() {
        return discription;
    }

    public void setDiscription(String discription) {
        this.discription = discription;
    }

    public static String getNameByType(String type) {
        ResidentTypeEnum[] enums = ResidentTypeEnum.values();
        for (ResidentTypeEnum enm : enums) {
            if (type.equals(enm.getType())) {
                return enm.name();
            }
        }
        return "";
    }
    public static String getDiscriptionByType(String type) {
        ResidentTypeEnum[] enums = ResidentTypeEnum.values();
        for (ResidentTypeEnum enm : enums) {
            if (type.equals(enm.getType())) {
                return enm.getDiscription();
            }
        }
        return "";
    }
}
